using System;
using System.Web.UI;

namespace ScottCateAjax2008.Lesson05
{
    public partial class J_UpdateMode : Page
    {
        protected void Page_Load( object sender, EventArgs e )
        {
            UpdateTimeLabels();
        }

        protected void UpdateTimes1(object sender, EventArgs e)
        {
            UpdateTimeLabels();
        }

        protected void UpdateTimes2(object sender, EventArgs e)
        {
            UpdateTimeLabels();
            UpdatePanel3.Update();
        }

        protected void UpdateTimes3(object sender, EventArgs e)
        {
            UpdateTimeLabels();
        }

        protected void UpdateTimes4(object sender, EventArgs e)
        {
            UpdateTimeLabels();
        }

        private void UpdateTimeLabels()
        {
            Time1.Text =
                Time2.Text =
                Time3.Text =
                Time4.Text =
                DateTime.Now.ToString();
        }
    }
}